#!/usr/bin/env python
# Copyright (c) 2016 The UUV Simulator Authors.
# All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

PACKAGE = "uuv_control"

from dynamic_reconfigure.parameter_generator_catkin import *

gen = ParameterGenerator()

gen.add("tf_prefix",           str_t, 0, "prefix for all tf frames", "dummy_uuv/")
gen.add("base_frame_name",     str_t, 0, "Name of base frame you want to control",  "base_link")
gen.add("thruster_frame_base", str_t, 0, "Base name (without id) of thruster tf frame",  "thruster_")

gen.add("max_thrust", double_t, 0, "Maximum thrust in [N]", 1500., 0,   30000)
gen.add("thrust_gain", double_t, 0, "thruster gain", 0.00031, 0,   1.0)

gen.add("total_mass", double_t, 0, "Total mass in [kg]", 3500, 0, 5000)

gen.add("ixx", double_t, 0, "inertia tensor in [kg m^2]", 1970, 0, 5000)
gen.add("ixy", double_t, 0, "inertia tensor in [kg m^2]", 0, 0, 5000)
gen.add("ixz", double_t, 0, "inertia tensor in [kg m^2]", 0, 0, 5000)
gen.add("iyy", double_t, 0, "inertia tensor in [kg m^2]", 3215, 0, 5000)
gen.add("iyz", double_t, 0, "inertia tensor in [kg m^2]", 0, 0, 5000)
gen.add("izz", double_t, 0, "inertia tensor in [kg m^2]", 3037, 0, 5000)

gen.add("thruster_topic_prefix",    str_t,    0, "Prefix of thruster topic (before id)",  "thrusters/")
gen.add("thruster_topic_suffix",    str_t,    0, "Suffix of thruster topic (before id)",  "/input")

exit(gen.generate(PACKAGE, "uuv_control_cascaded_pid", "AccelerationControl"))
